package com.hy.mvc.biz.excel.builder.impl;

import com.hy.mvc.biz.excel.builder.AbstractSheetBuilder;
import org.apache.poi.hssf.usermodel.HSSFSheet;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * Created by Booker on 2017/7/3.
 */
@Component("sheetBuilder")
public class SheetBuilder extends AbstractSheetBuilder {

    @Override
    public HSSFSheet buildSheet(HSSFSheet workSheet, List<?> exportList) {
        workSheet = super.buildCommonProperty(workSheet, super.getExcelModel());

        workSheet = super.buildTitle(workSheet, super.getExcelModel());

        workSheet = super.buildHeader(workSheet, super.getExcelModel());

        workSheet = super.buildContent(workSheet, super.getExcelModel(), exportList);

        return workSheet;
    }
}

